<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>国有企业招聘</title>
  <link rel="stylesheet" href="./styles/common.css">
</head>

<body>
  <script src="http://rsj.beijing.gov.cn/images/rsj_header.js"></script>
  <!-- 公共头部 -->
  <include src="./include/header.html"></include>

  <!-- 内容区域 -->
  <div class="message">
    <div class="content clearfix">
      <div class="zuo left boxShadow">
        <!-- <div class="titles concommon">
          <h3>企业信息</h3>
          <span class="J_dont edit">修改</span>
        </div>
        <div class="leftcon">
          <form class="qyform" name="form_info" msgtype="2" validate="blur">
            <h3 class="qymc qymcInfo"></h3>
            <div class="col clearfix">
              <div class="row_2">
                <div class="text_l">统一社会信用代码：</div>
                <div class="text_r xydmInfo"> </div>
              </div>
              <div class="row_2">
                <div class="text_l">联系人：</div>
                <div class="text_r lxrInfo"> </div>
              </div>
            </div>
            <div class="col clearfix">
              <div class="row_2">
                <div class="text_l">单位登记状态：</div>
                <div class="text_r djztInfo"> </div>
              </div>
              <div class="row_2">
                <div class="text_l">登记时间：</div>
                <div class="text_r djsjInfo"> </div>
              </div>
            </div>
            <div class="col clearfix">
              <div class="row_2">
                <div class="text_l">是否国企：</div>
                <div class="text_r sfgqInfo"> </div>
              </div>
              <div class="row_2">
                <div class="text_l">联系电话：</div>
                <div class="text_r lxdhInfo"> </div>
              </div>
            </div>
            <div class="col clearfix">
              <div class="row J_sjdw">
                <div class="text_l">上级单位：</div>
                <div class="text_r sjdwInfo"> </div>
              </div>
            </div>
          </form>

        </div> -->
        <div class="titles concommon">
          <h3>招聘信息列表</h3>
          <span class="J_gwAdd add">新增岗位</span>
        </div>
        <div class="table_con concommon" id="detailWrap">
          <script type="text/html" id="detailTem">
            <%if(data.executeResult == 1){%>
            <% var _data = data.zplb%>
            <table border="0" cellspacing="0" cellpadding="0" class="table">
              <tr>
                <td width="">序号</td>
                <td width="30%">岗位名称</td>
                <td width="">招聘人数</td>
                <td width="">岗位状态</td>
                <td width="">岗位有效期</td>
                <td width="18%">操作</td>
              </tr>
              <%for(var i=0;i<_data.length;i++){%>
              <% var _item = _data[i]%>

              <tr class="<%=(i%2)==1?'bg_tr': ''%>">
                <td><%=+wrapData.startNum+i%></td>
                <td class="boldcolor" zpgwid="<%=_item.zpgwid%>"><%=_item.gwmc%></td>
                <td><%=_item.zrs%></td>
                <td><%=_item.gwshzt%></td>
                <td><%=_item.fbjzsj%></td>
                <%if(_item.shzt=="10"){%> 
                  <td>
                    <span class="delay bgCo" zpgwid="<%=_item.zpgwid%>" dwdjid="<%=_item.dwdjid%>">延期</span>
                    <span class="file bgCo" zpgwid="<%=_item.zpgwid%>" dwdjid="<%=_item.dwdjid%>">归档</span>
                  </td>
                  <%}else{%>
                    <td>--</td>
                  <%}%>
               
              
                <!-- <td><span class="J_change" zpgwid="<%=_item.zpgwid%>">修改</span></td> -->
              </tr>
              <%}%>
          </table>
          <%}%>

          </script>
        </div>
      </div>
      <!-- 公用右侧企业信息模块 -->
      <include src="./include/rightbox.html"></include>
    </div>
  </div>
  <!-- 公共尾部 -->
  <script src="http://rsj.beijing.gov.cn/footer.js"></script>
</body>
<script src="./common/vendor.js"></script>
<script src="./common/common.js"></script>
<script src="./common/generaltools.js"></script>
<script>
  $(function () {
    var loading = new $.Loading(),
      pageNum = 0;
    // 回显
    searchCx();

    function searchCx() {
      loading.on()
      $('#detailWrap').pageTool({
        url: '/dwgl/zplbCx',
        type: 'get',
        data: {
          pageNum: pageNum,
          pageSize: 12
        },
        locator: 'returnData',
        callback: function (res) {
          loading.off();
        }
      });
    }
    // 单位信息维护
    $(document).on('click', '.boldcolor', function () {
      window.open ( "./gwxxxq.html?id=" + $(this).attr('zpgwid'))
    });
   
    $(document).on('click', '.delay', function () {
       var zpgwid  = $(this).attr("zpgwid");
       var dwdjid = $(this).attr("dwdjid");
       $.layerMsg("是否确认延期？", [{
              text: '是',
              cb: function () {
                zpxxBc(zpgwid,3,dwdjid);
              }
            },
            {
              text: '否',
              cb: function () {}
            }
          ])
    });
    $(document).on('click', '.file', function () {
      var zpgwid  = $(this).attr("zpgwid");
      var dwdjid = $(this).attr("dwdjid");
      $.layerMsg("是否确认归档？", [{
              text: '是',
              cb: function () {
                zpxxBc(zpgwid,0,dwdjid);
              }
            },
            {
              text: '否',
              cb: function () {}
            }
          ])
    });
    // 延期和归档
    function zpxxBc(zpgwid,ywcz,dwdjid) {
      $.fetch({
        url: '/dwgl/zpxxBc',
        type: 'post',
        data: {
          zpgwid:zpgwid,
          ywcz: ywcz,
          dwdjid:dwdjid
        }
      }).done(function (res) { 
        var _res = res.returnData;
        if (_res.executeResult == 1) { 
          $.layerMsg('操作成功', '确定',function () {
            searchCx();
            })
        }
        else{
          $.layerMsg(res.returnData.message, '确定')
        }
       })
    }










  });

</script>

</html>
